﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucComment" TagName="Comment" Src="../Common/Inc/Comment.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Cfg1011m.aspx.cs" Inherits="Updms.Cfg.Cfg1011m" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>▒ UPDMS [Cfg1011m] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
<tr>
	<td id="top_area" colspan="2">
		<!-- Top 시작 -->
		<ucTop:Top id="Top" runat="server"></ucTop:Top>
		<!-- Top 끝 -->	
	</td>
</tr>
<tr>
	<td id="menu_area">
		<!-- 메뉴 시작 -->
		<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
		<!-- 메뉴 끝 -->	
	</td>
	<td id="contents_area">
		<!-- 제목 시작 -->
		<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Cfg1011m" runat="server"></ucTabTitle:TabTitle>
		<!-- 제목 끝 -->
		<!-- AJAX 시작 -->
		<asp:UpdatePanel ID="UpdatePanel1" runat="server">
		<Triggers>
			<asp:PostBackTrigger ControlID="ibtn_excel"/>
		</Triggers>
		<ContentTemplate>
		<!-- 버튼 시작 -->
		<div class="button_area">
			<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_delete" Text="삭제" runat="server" CssClass="ibtn ibtn_delete" OnClientClick="return chkDelete()" OnClick="ibtn_delete_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_save" Text="저장" runat="server" CssClass="ibtn ibtn_save" OnClientClick="return chkSave()" OnClick="ibtn_save_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClick="ibtn_search_Click"></asp:linkbutton>
		</div>
		<!-- 버튼 끝 -->
		<!-- 검색 시작 -->
		<table class="table_search">
		<tr>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_setting_nm" Text="설정명" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_search_setting_nm" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_setting_cd" Text="설정코드" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_search_setting_cd" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_setting_value" Text="설정값" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_search_setting_value" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
		</tr>
		</table>
		<!-- 검색 끝 -->
		<!-- 페이지모드 전환버튼 시작 -->
		<div class="page_mode_area">
			<span id="btn_chg_mode" onclick="return chgMode();" runat="server"></span>
			<span id="btn_init_mode" title="초기화" class="sbtn sbtn_init" onclick="return initDetail();"></span>
		</div>
		<!-- 페이지모드 전환버튼 끝 -->
		<!-- 디테일1 시작 -->
		<table class="table_detail">
		<tr>
			<td class="lbl" width="11%"><asp:Literal id="ltr_setting_nm" Text="설정명" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_setting_nm" runat="server" Width="98%" CssClass="ib_b req"></asp:textbox></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_setting_cd" Text="설정코드" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_setting_cd" runat="server" Width="98%" CssClass="ib_b req"></asp:textbox></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_setting_value" Text="설정값" runat="server" /></td>
			<td class="ctl" width="22%">
				<ul class="horizontal">
					<li style="width:80%;"><asp:textbox id="txt_setting_value" runat="server" Width="95%" CssClass="ib_b req"></asp:textbox></li>
					<li style="width:10%;padding:2px 0 0 4px;"><span id="search_setting_value" onclick="goSettingValuePage()" class="sbtn sbtn_search_pop"></span></li>
			</td>
		</tr>
		<tr>
			<td class="lbl"><asp:Literal id="ltr_remark" Text="비고" runat="server" /></td>
			<td class="ctl" colspan="3"><asp:textbox id="txt_remark" runat="server" Width="99%" CssClass="ib_b"></asp:textbox></td>
			<td class="lbl"><asp:Literal id="ltr_use_yn" Text="사용여부" runat="server" /></td>
			<td class="ctl"><asp:radiobuttonlist id="rbl_use_yn" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rbl_flow"></asp:radiobuttonlist></td>
		</tr>
		</table>
		<!-- 디테일1 끝 -->
		<!-- 리스트셋 시작 -->
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tr>
			<td>
				<!-- 검색어 시작 -->
				<div class="div_left">Keyword : <asp:label id="lbl_search_keyword" runat="server"></asp:label></div>
				<div class="div_right"><asp:checkbox id="cb_list_all" runat="server" AutoPostBack="True" OnCheckedChanged="cb_list_all_CheckedChanged" ToolTip="Show All"></asp:checkbox></div>
				<!-- 검색어 끝 -->
			</td>
		</tr>
		<tr>
			<td>
				<!-- 리스트 시작 -->
				<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" DataKeyNames="Seq,Remark">
					<Columns>
						<asp:TemplateField HeaderText="&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;checkBoxCheck('GridView1');&quot;&gt;S&lt;/a&gt;">
							<ItemTemplate>
								<input id="cb_check" class="cb" type="checkbox" onclick="reverseRow('GridView1', 0);" runat="server" />
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Width="2%" />
						</asp:TemplateField>
						<asp:BoundField HeaderText="번호" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="4%" />
						</asp:BoundField>
						<asp:BoundField DataField="Seq" HeaderText="Seq(X)" Visible="False" />
						<asp:TemplateField HeaderText="설정명">
							<ItemTemplate>
								<asp:LinkButton ID="lbtn_rc" runat="server" Text='<%# Bind("Setting_Nm") %>'></asp:LinkButton>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Left" Width="20%" />
							<HeaderStyle CssClass="lbtn_rc" />
						</asp:TemplateField>
						<asp:BoundField DataField="Setting_Cd" HeaderText="설정코드" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="10%" />
						</asp:BoundField>
						<asp:BoundField DataField="Setting_Value" HeaderText="설정값" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="20%" />
						</asp:BoundField>
						<asp:BoundField DataField="Remark" HeaderText="Remark(X)" Visible="False" />
						<asp:BoundField DataField="Remark_Replace" HeaderText="비고" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="38%" />
						</asp:BoundField>						
						<asp:BoundField DataField="Use_Yn" HeaderText="사용여부" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="12%" />
						</asp:BoundField>
					</Columns>
					<EmptyDataTemplate>
						<div id="no_data"></div>
					</EmptyDataTemplate>
				</asp:GridView>
				<!-- 리스트 끝 -->
			</td>
		</tr>
		<tr>
			<td>
				<!-- 페이징 시작 -->
				<div class="div_left">Result : <asp:label id="lbl_result_count" runat="server"></asp:label></div>
				<div class="div_right"><asp:label id="lbl_page" runat="server"></asp:label></div>
				<!-- 페이징 끝 -->
			</td>
		</tr>
		</table>			
		<!-- 리스트셋 끝 -->
		<!-- 암호화/복호화 시작 -->
		<table class="table_detail" style="margin:10px 0 0 0;">
			<tr>
				<td class="lbl" width="11%"><asp:Literal id="ltr_enc" Text="암호화" runat="server" /></td>
				<td class="ctl" width="88%">
					<ul class="horizontal">
						<li style="width:30%;"><asp:TextBox id="txt_enc_input" runat="server" CssClass="ib_b" Width="98.4%"></asp:TextBox></li>
						<li style="width:5%;text-align:center;"><img id="imgEnc" src="../Common/Images/arrow_redo.png" alt="암호화" class="hand" onclick="doEnc();" runat="server" /></li>
						<li style="width:65%;"><asp:TextBox id="txt_enc_output" runat="server" CssClass="ib_b" Width="99.8%"></asp:TextBox></li>
					</ul>
				</td>
			</tr>
			<tr>
				<td class="lbl"><asp:Literal id="ltr_dec" Text="복호화" runat="server" /></td>
				<td class="ctl">
					<ul class="horizontal">
						<li style="width:30%;"><asp:TextBox id="txt_dec_input" runat="server" CssClass="ib_b" Width="98.4%"></asp:TextBox></li>
						<li style="width:5%;text-align:center;"><img id="imgDec" src="../Common/Images/arrow_undo.png" alt="복호화" class="hand" onclick="doDec();" runat="server" /></li>
						<li style="width:65%;"><asp:TextBox id="txt_dec_output" runat="server" CssClass="ib_b" Width="99.8%"></asp:TextBox></li>
					</ul>
				</td>
			</tr>
		</table>
		<!-- 암호화/복호화 끝 -->
		<!-- 설명 시작 -->
			<ucComment:Comment id="Comment" TagPrefixs="Cfg1011m" runat="server"></ucComment:Comment>
			<!-- 설명 끝 -->
		<!-- 카피라이트 시작 -->
		<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
		<!-- 카피라이트 끝 -->
		<!-- 히든값 시작 -->
		<div id="hdn_data">
			<asp:label id="lbl_pk" runat="server"></asp:label>
			<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			<input id="h_no" type="hidden" name="h_no" runat="server" />
			<asp:linkbutton id="lbtn_init_detail" runat="server" OnClick="lbtn_init_detail_Click" />
			<asp:linkbutton id="lbtn_chg_mode" runat="server" OnClick="lbtn_chg_mode_Click" />
			<asp:linkbutton id="ibtn_enc" runat="server" OnClick="ibtn_enc_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_dec" runat="server" OnClick="ibtn_dec_Click"></asp:linkbutton>
		</div>
		<!-- 히든값 끝 -->
		</ContentTemplate>
		</asp:UpdatePanel>
		<!-- AJAX 끝 -->
	</td>
</tr>
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>
<script type="text/javascript" language="javascript" defer="defer">
	//디테일 초기화
	function initDetail() {
		__doPostBack('lbtn_init_detail', '');
	}

	//페이지모드 변경
	function chgMode() {
		__doPostBack('lbtn_chg_mode', '');
	}

	//저장
	function chkSave() {
		if ($F("txt_setting_nm").blank()) {
			msgBox.alert(getMsg(MSG_ERR_185), setFocus, "txt_setting_nm"); //설정명을 입력해 주세요
			return false;
		}
		if ($F("txt_setting_cd").blank()) {
			msgBox.alert(getMsg(MSG_ERR_186), setFocus, "txt_setting_cd"); //설정코드를 입력해 주세요
			return false;
		}
		if ($F("txt_setting_value").blank()) {
			msgBox.alert(getMsg(MSG_ERR_187), setFocus, "txt_setting_value"); //설정값을 입력해 주세요
			return false;
		}

		var pk = $get("lbl_pk").innerHTML;
		var MSG_ID = (pk == "") ? MSG_CFM_000 : MSG_CFM_028; //저장/수정
		msgBox.confirm(getMsg(MSG_ID), doSave); //XX하시겠습니까?

		return false;
	}

	//삭제
	function chkDelete() {
		if (!isCheckedOnGridView("GridView1", 0)) {
			msgBox.alert(getMsg(MSG_ERR_053)); //삭제할 항목을 선택하세요
			return false;
		}
		msgBox.confirm(getMsg(MSG_CFM_001), doDelete); //삭제하시겠습니까?
		return false;
	}

	//암호화
	function doEnc() {
		__doPostBack('ibtn_enc', '');
	}

	//복호화
	function doDec() {
		__doPostBack('ibtn_dec', '');
	}

</script>
</body>
</html>